﻿/**
 * Algorithms for benchmarking are found here.
 * @dependencies benchmark.js
 */

/**
 * @param {String} the algorithm's name
 * @return {Algorithm} an Algorithm instance for the name
 */
getAlgorithm = function(algorithmName) {

	/**
	 * Array.sort()
	 */
	var nativeArraySorting = function() {
		var algorithm = new Algorithm(function(inputArray) {
				return inputArray.sort();
			}, {
				name: "Array.sort()",
				description: "Calls the browser's native Array object's sort method."
			}
		);

		return algorithm;
	}

	/**
	 * Quick sort
	 */
	var quickSorting = function() {
		
	}

	if (algorithmName == 'nativeArraySort') {
		return nativeArraySorting();
	} else if (algorithmName == 'quickSort') {
		return quickSorting();
	}
}